{% extends "base.html" %}
{% load i18n %}
{% block title %} Tu Negocio Empresarios - Ver Pagos Cliente {% endblock %}
{% block head-css-ext %}
    <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}css/layout.css" media="screen" />
    <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}css/blue/style.css" media="print, projection, screen" />
{% endblock %}

{% block head-js-ext %}
    <script type="text/javascript" src="{{MEDIA_URL}}js/jquery.js"></script>
    <script type="text/javascript" src="{{MEDIA_URL}}js/jquery.tablesorter.js"></script>
    <script type="text/javascript" src="{{MEDIA_URL}}js/jquery.tablePagination.js"></script>
    <script type="text/javascript" src="{{MEDIA_URL}}js/jquery.translate.js"></script>
{% endblock %}

{% block head-js-embedded %}
    <script type="text/javascript">
        $(document).ready(function(){
            var options = {
                firstArrow : (new Image()).src="{{MEDIA_URL}}img/icons/first.png",
                prevArrow : (new Image()).src="{{MEDIA_URL}}img/icons/prev.png",
                lastArrow : (new Image()).src="{{MEDIA_URL}}img/icons/last.png",
                nextArrow : (new Image()).src="{{MEDIA_URL}}img/icons/next.png"
            }	  
            $("#pagos")		
              .tablesorter({widthFixed: true,  widgets: ['zebra'], headers: { 0:{sorter: false}, 1:{sorter: false} } })
              .tablePagination(options);
		
            $("#tablePagination").translate('en', 'es');	  
        });        
    </script>
{% endblock %}

{% block content-box1 %}
    Historial de Pagos del Cliente: {{ cliente }}
    {% if pagos %}   
        <table id="pagos" class="tablesorter">
            <thead>
                <tr align="center">
                    <th>Cliente&nbsp;&nbsp;&nbsp;</th>
                    <th>Valor Pagado</th>
                    <th>Fecha de Pago</th>
                </tr>            
            </thead>
            <tbody>
                {% for pago in pagos %}               
                    <tr align="center">
                        <td>{{ pago.cliente}}</td>
                        <td>{{ pago.valor_pagado }}</td>
                        <td>{{ pago.fecha_pago|date:"d M Y" }}</td>
                    </tr>
                {% endfor %}
            </tbody>
        </table>   
    {% else %}
        <p><b>No tiene Pagos registrados de {{ cliente }} hasta el momento</b></p>
    {% endif %}
{% endblock %}
{% block content-colum2 %}
    {% if user.is_authenticated %}
        <ul>
            <li><a href="{% url index %}">{% trans "Home" %}</a></li>
            <li><a href="{% url clientes %}">Clientes</a></li>
            <li><a href="{% url pagos_clientes %}">Pagos Clientes</a></li>
            <li><a href="{% url registrar_pago_cliente cliente.codigo %}">Registrar Pago Cliente</a></li>
        </ul>
    {% endif %}   
{% endblock %}